Make media-query-listener-exception.html unflaky.

https://codereview.chromium.org/337883003/ accidentally made this test flaky.
Fix this by calling finish from the event listener.

BUG=390445
R=yurys@chromium.org

Review URL: https://codereview.chromium.org/398413002

git-svn-id: svn://svn.chromium.org/blink/trunk@178497 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a4b6ac54
...@@ -1154,17 +1154,6 @@ Bug(gardener) [ Debug Linux ] inspector-enabled/sources/debugger/script-formatte ...@@ -1154,17 +1154,6 @@ Bug(gardener) [ Debug Linux ] inspector-enabled/sources/debugger/script-formatte
Bug(gardener) [ Debug Win7 ] inspector-enabled/sources/debugger/script-formatter-console.html [ Pass Timeout ] Bug(gardener) [ Debug Win7 ] inspector-enabled/sources/debugger/script-formatter-console.html [ Pass Timeout ]
webkit.org/b/90488 [ Debug Win7 ] inspector-protocol/cpu-profiler/enable-disable.html [ Crash Pass ] webkit.org/b/90488 [ Debug Win7 ] inspector-protocol/cpu-profiler/enable-disable.html [ Crash Pass ]
webkit.org/b/90488 [ Debug Win7 ] inspector-protocol/cpu-profiler/record-cpu-profile.html [ Crash Pass ] webkit.org/b/90488 [ Debug Win7 ] inspector-protocol/cpu-profiler/record-cpu-profile.html [ Crash Pass ]
crbug.com/390445 [ Release Linux ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 webkit.org/b/90488 [ Debug Linux ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 [ Release SnowLeopard ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 [ Release Lion ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 webkit.org/b/90488 [ Debug Lion ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 [ Release MountainLion ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 [ Release Retina ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 [ Release Mavericks ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 [ Release Win7 ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 webkit.org/b/90488 [ Debug Win7 ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/390445 [ Release XP ] inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
webkit.org/b/90488 [ Debug Linux ] inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html [ Pass Timeout ] webkit.org/b/90488 [ Debug Linux ] inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html [ Pass Timeout ]
crbug.com/312925 webkit.org/b/90488 [ Debug Linux ] inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html [ Failure Pass ] crbug.com/312925 webkit.org/b/90488 [ Debug Linux ] inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html [ Failure Pass ]
crbug.com/312925 [ Release SnowLeopard ] inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html [ Failure Pass ] crbug.com/312925 [ Release SnowLeopard ] inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html [ Failure Pass ]
......
...@@ -653,7 +653,6 @@ crbug.com/313219 traversal/tree-walker-005.html [ Crash Pass ] ...@@ -653,7 +653,6 @@ crbug.com/313219 traversal/tree-walker-005.html [ Crash Pass ]
crbug.com/313219 traversal/node-iterator-004.html [ Crash Pass ] crbug.com/313219 traversal/node-iterator-004.html [ Crash Pass ]
crbug.com/312925 inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html [ Failure Pass ] crbug.com/312925 inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html [ Failure Pass ]
crbug.com/344239 inspector-protocol/heap-profiler/heap-objects-tracking.html [ Crash Pass Timeout ] crbug.com/344239 inspector-protocol/heap-profiler/heap-objects-tracking.html [ Crash Pass Timeout ]
crbug.com/390445 inspector-protocol/css/media-query-listener-exception.html [ Failure Pass ]
crbug.com/313846 http/tests/images/webp-partial-load.html [ ImageOnlyFailure Timeout Pass ] crbug.com/313846 http/tests/images/webp-partial-load.html [ ImageOnlyFailure Timeout Pass ]
......
CONSOLE ERROR: line 13: Uncaught ReferenceError: objectThatDoesNotExist is not defined CONSOLE ERROR: line 25: Uncaught ReferenceError: objectThatDoesNotExist is not defined
CONSOLE ERROR: line 13: Uncaught ReferenceError: objectThatDoesNotExist is not defined CONSOLE ERROR: line 25: Uncaught ReferenceError: objectThatDoesNotExist is not defined
Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). Bug 105162. Test that uncaught exception in MediaQueryListListener will be reported to the console. On success you should see two exceptions in the listener logged to the console (first time when the media type is overridden and second - when they are restored). Bug 105162.
...@@ -9,18 +9,33 @@ if (window.testRunner) { ...@@ -9,18 +9,33 @@ if (window.testRunner) {
var theMediaQueryList = window.matchMedia("print"); var theMediaQueryList = window.matchMedia("print");
var callCount = 0;
theMediaQueryList.addListener(function(aMediaQueryList) { theMediaQueryList.addListener(function(aMediaQueryList) {
++callCount;
if (callCount == 1) {
// This needs to use setTimeout because we want to test
// uncaught exceptions.
setTimeout("evaluateInFrontend('InspectorTest.sendPageDisable()')", 0);
}
if (callCount == 2) {
// This needs to use setTimeout because we want to test
// uncaught exceptions.
setTimeout("evaluateInFrontend('InspectorTest.completeTest()')", 0);
}
objectThatDoesNotExist.produceError(); objectThatDoesNotExist.produceError();
}); });
function test() function test()
{ {
InspectorTest.sendPageDisable = function()
{
InspectorTest.sendCommand("Page.disable", {});
}
function didSetEmulatedMedia(messageObject) function didSetEmulatedMedia(messageObject)
{ {
if (messageObject.error) if (messageObject.error)
InspectorTest.log("FAILED: " + messageObject.error.message); InspectorTest.log("FAILED: " + messageObject.error.message);
InspectorTest.sendCommand("Page.disable", {});
setTimeout("InspectorTest.completeTest();", 20);
} }
InspectorTest.sendCommand("Page.enable", {}); InspectorTest.sendCommand("Page.enable", {});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment