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

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

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
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/browser/ui/browser_tabstrip.h" 6 #include "chrome/browser/ui/browser_tabstrip.h"
7 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
8 #include "chrome/test/base/in_process_browser_test.h" 8 #include "chrome/test/base/in_process_browser_test.h"
9 #include "chrome/test/base/ui_test_utils.h" 9 #include "chrome/test/base/ui_test_utils.h"
10 #include "content/public/browser/navigation_details.h" 10 #include "content/public/browser/navigation_details.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 12
13 using content::WebContents; 13 using content::WebContents;
14 14
15 namespace { 15 namespace {
16 16
17 const char kSharedWorkerTestPage[] = 17 const char kSharedWorkerTestPage[] =
18 "files/workers/workers_ui_shared_worker.html"; 18 "files/workers/workers_ui_shared_worker.html";
19 const char kSharedWorkerJs[] = 19 const char kSharedWorkerJs[] =
20 "files/workers/workers_ui_shared_worker.js"; 20 "files/workers/workers_ui_shared_worker.js";
21 21
22 class InspectUITest : public InProcessBrowserTest { 22 class InspectUITest : public InProcessBrowserTest {
23 public: 23 public:
24 InspectUITest() { 24 InspectUITest() {}
25 EnableDOMAutomation();
26 }
27 25
28 private: 26 private:
29 DISALLOW_COPY_AND_ASSIGN(InspectUITest); 27 DISALLOW_COPY_AND_ASSIGN(InspectUITest);
30 }; 28 };
31 29
32 // The test fails on Mac OS X and Windows, see crbug.com/89583 30 // The test fails on Mac OS X and Windows, see crbug.com/89583
33 // Intermittently fails on Linux. 31 // Intermittently fails on Linux.
34 IN_PROC_BROWSER_TEST_F(InspectUITest, DISABLED_SharedWorkersList) { 32 IN_PROC_BROWSER_TEST_F(InspectUITest, DISABLED_SharedWorkersList) {
35 ASSERT_TRUE(test_server()->Start()); 33 ASSERT_TRUE(test_server()->Start());
36 GURL url = test_server()->GetURL(kSharedWorkerTestPage); 34 GURL url = test_server()->GetURL(kSharedWorkerTestPage);
(...skipping 14 matching lines...) Expand all
51 web_contents->GetRenderViewHost(), 49 web_contents->GetRenderViewHost(),
52 L"", 50 L"",
53 L"window.domAutomationController.send(" 51 L"window.domAutomationController.send("
54 L"'' + document.body.textContent);", 52 L"'' + document.body.textContent);",
55 &result)); 53 &result));
56 ASSERT_TRUE(result.find(kSharedWorkerJs) != std::string::npos); 54 ASSERT_TRUE(result.find(kSharedWorkerJs) != std::string::npos);
57 ASSERT_TRUE(result.find(kSharedWorkerTestPage) != std::string::npos); 55 ASSERT_TRUE(result.find(kSharedWorkerTestPage) != std::string::npos);
58 } 56 }
59 57
60 } // namespace 58 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/bookmarks_ui_browsertest.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698