Skip to content

Commit d50e7b4

Browse files
committed
Improvements to test_html_source_map.
* Now works on FF Nightly * Test does not run unless explicitly requested
1 parent 4eef4be commit d50e7b4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/runner.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11766,6 +11766,8 @@ def test_html(self):
1176611766
message='You should see "hello, world!" and a colored cube.')
1176711767

1176811768
def test_html_source_map(self):
11769+
if 'test_html_source_map' not in str(sys.argv): return self.skip('''This test
11770+
requires manual intervention; will not be run unless explicitly requested''')
1176911771
cpp_file = os.path.join(self.get_dir(), 'src.cpp')
1177011772
html_file = os.path.join(self.get_dir(), 'src.html')
1177111773
# browsers will try to 'guess' the corresponding original line if a
@@ -11788,7 +11790,10 @@ def test_html_source_map(self):
1178811790
return 0;
1178911791
}
1179011792
''')
11791-
Popen([PYTHON, EMCC, cpp_file, '-o', html_file, '--map']).communicate()
11793+
# use relative paths when calling emcc, because file:// URIs can only load
11794+
# sourceContent when the maps are relative paths
11795+
Popen([PYTHON, EMCC, 'src.cpp', '-o', 'src.html', '--map'],
11796+
cwd=self.get_dir()).communicate()
1179211797
webbrowser.open_new('file://' + html_file)
1179311798
print '''
1179411799
Set the debugger to pause on exceptions

0 commit comments

Comments
 (0)