Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Side by Side Diff: chrome/browser/ui/webui/inspect_ui_browsertest.cc

Issue 9836007: Disable WorkersUITest.SharedWorkersList on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 #include "chrome/common/url_constants.h" 6 #include "chrome/common/url_constants.h"
7 #include "chrome/test/base/in_process_browser_test.h" 7 #include "chrome/test/base/in_process_browser_test.h"
8 #include "chrome/test/base/ui_test_utils.h" 8 #include "chrome/test/base/ui_test_utils.h"
9 #include "content/public/browser/navigation_details.h" 9 #include "content/public/browser/navigation_details.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 12 matching lines...) Expand all
23 InspectUITest() { 23 InspectUITest() {
24 set_show_window(true); 24 set_show_window(true);
25 EnableDOMAutomation(); 25 EnableDOMAutomation();
26 } 26 }
27 27
28 private: 28 private:
29 DISALLOW_COPY_AND_ASSIGN(InspectUITest); 29 DISALLOW_COPY_AND_ASSIGN(InspectUITest);
30 }; 30 };
31 31
32 // The test fails on Mac OS X and Windows, see crbug.com/89583 32 // The test fails on Mac OS X and Windows, see crbug.com/89583
33 #if defined(OS_LINUX) 33 // Intermittently fails on Linux.
34 #define MAYBE_SharedWorkersList SharedWorkersList 34 IN_PROC_BROWSER_TEST_F(InspectUITest, DISABLED_SharedWorkersList) {
35 #else
36 #define MAYBE_SharedWorkersList DISABLED_SharedWorkersList
37 #endif
38 IN_PROC_BROWSER_TEST_F(InspectUITest, MAYBE_SharedWorkersList) {
39 ASSERT_TRUE(test_server()->Start()); 35 ASSERT_TRUE(test_server()->Start());
40 GURL url = test_server()->GetURL(kSharedWorkerTestPage); 36 GURL url = test_server()->GetURL(kSharedWorkerTestPage);
41 ui_test_utils::NavigateToURL(browser(), url); 37 ui_test_utils::NavigateToURL(browser(), url);
42 38
43 ui_test_utils::NavigateToURLWithDisposition( 39 ui_test_utils::NavigateToURLWithDisposition(
44 browser(), 40 browser(),
45 GURL(chrome::kChromeUIInspectURL), 41 GURL(chrome::kChromeUIInspectURL),
46 NEW_FOREGROUND_TAB, 42 NEW_FOREGROUND_TAB,
47 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 43 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
48 44
49 WebContents* web_contents = browser()->GetSelectedWebContents(); 45 WebContents* web_contents = browser()->GetSelectedWebContents();
50 ASSERT_TRUE(web_contents != NULL); 46 ASSERT_TRUE(web_contents != NULL);
51 47
52 std::string result; 48 std::string result;
53 ASSERT_TRUE( 49 ASSERT_TRUE(
54 ui_test_utils::ExecuteJavaScriptAndExtractString( 50 ui_test_utils::ExecuteJavaScriptAndExtractString(
55 web_contents->GetRenderViewHost(), 51 web_contents->GetRenderViewHost(),
56 L"", 52 L"",
57 L"window.domAutomationController.send(" 53 L"window.domAutomationController.send("
58 L"'' + document.body.textContent);", 54 L"'' + document.body.textContent);",
59 &result)); 55 &result));
60 ASSERT_TRUE(result.find(kSharedWorkerJs) != std::string::npos); 56 ASSERT_TRUE(result.find(kSharedWorkerJs) != std::string::npos);
61 ASSERT_TRUE(result.find(kSharedWorkerTestPage) != std::string::npos); 57 ASSERT_TRUE(result.find(kSharedWorkerTestPage) != std::string::npos);
62 } 58 }
63 59
64 } // namespace 60 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698