diff options
-rw-r--r-- | chrome/browser/extensions/extension_devtools_browsertests.cc | 3 | ||||
-rw-r--r-- | chrome/test/data/extensions/devtools/timeline_api/background.js | 12 |
2 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_devtools_browsertests.cc b/chrome/browser/extensions/extension_devtools_browsertests.cc index ccba4d1..a8759f7 100644 --- a/chrome/browser/extensions/extension_devtools_browsertests.cc +++ b/chrome/browser/extensions/extension_devtools_browsertests.cc @@ -50,8 +50,7 @@ static ExtensionHost* FindHostWithPath(ExtensionProcessManager* manager, } // Tests for the experimental timeline extensions API. -// http://crbug.com/69369 http://crbug.com/52544 -IN_PROC_BROWSER_TEST_F(ExtensionDevToolsBrowserTest, FLAKY_TimelineApi) { +IN_PROC_BROWSER_TEST_F(ExtensionDevToolsBrowserTest, TimelineApi) { ASSERT_TRUE(LoadExtension( test_data_dir_.AppendASCII("devtools").AppendASCII("timeline_api"))); diff --git a/chrome/test/data/extensions/devtools/timeline_api/background.js b/chrome/test/data/extensions/devtools/timeline_api/background.js index 96b40a8..0dc0e69 100644 --- a/chrome/test/data/extensions/devtools/timeline_api/background.js +++ b/chrome/test/data/extensions/devtools/timeline_api/background.js @@ -24,22 +24,24 @@ function setListenersOnTab(tabId) { } } +/** + * Sends true if next event was a onPageEvent and pop it from |receivedEvents|. + */ function testReceivePageEvent() { var sawPage = false; - if (receivedEvents.length == 1) { + if (receivedEvents.length >= 1) { var eventName = receivedEvents.pop(); if (eventName === "onPageEvent") sawPage = true; else console.warn('received ' + eventName + '; expecting onPageEvent'); - } else { - console.warn('received ' + receivedEvents.toString() + - '; expecting onPageEvent'); - receivedEvents = []; } window.domAutomationController.send(sawPage); } +/** + * Sends true if any event is onTabClose and clear |receivedEvents|. + */ function testReceiveTabCloseEvent() { var sawTabClose = false; for(var i = 0; i < receivedEvents.length; i++) { |