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

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

Issue 9724038: DevTools: convert about:workers into about:inspect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments addressed. 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 | « chrome/browser/ui/webui/workers_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/browser.h"
6 #include "chrome/common/url_constants.h"
7 #include "chrome/test/base/in_process_browser_test.h"
8 #include "chrome/test/base/ui_test_utils.h"
9 #include "content/public/browser/navigation_details.h"
10 #include "content/public/browser/web_contents.h"
11
12 using content::WebContents;
13
14 namespace {
15
16 const char kSharedWorkerTestPage[] =
17 "files/workers/workers_ui_shared_worker.html";
18 const char kSharedWorkerJs[] =
19 "files/workers/workers_ui_shared_worker.js";
20
21 class WorkersUITest : public InProcessBrowserTest {
22 public:
23 WorkersUITest() {
24 set_show_window(true);
25 EnableDOMAutomation();
26 }
27
28 private:
29 DISALLOW_COPY_AND_ASSIGN(WorkersUITest);
30 };
31
32 // The test fails on Mac OS X, see crbug.com/89583
33 IN_PROC_BROWSER_TEST_F(WorkersUITest, DISABLED_SharedWorkersList) {
34 ASSERT_TRUE(test_server()->Start());
35 GURL url = test_server()->GetURL(kSharedWorkerTestPage);
36 ui_test_utils::NavigateToURL(browser(), url);
37
38 ui_test_utils::NavigateToURLWithDisposition(
39 browser(),
40 GURL(chrome::kChromeUIWorkersURL),
41 NEW_FOREGROUND_TAB,
42 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
43
44 WebContents* web_contents = browser()->GetSelectedWebContents();
45 ASSERT_TRUE(web_contents != NULL);
46
47 std::string result;
48 ASSERT_TRUE(
49 ui_test_utils::ExecuteJavaScriptAndExtractString(
50 web_contents->GetRenderViewHost(),
51 L"",
52 L"window.domAutomationController.send("
53 L"'' + document.getElementsByTagName('td')[1].textContent);",
54 &result));
55 ASSERT_TRUE(result.find(kSharedWorkerJs) != std::string::npos);
56 }
57
58 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698