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

Side by Side Diff: chrome/browser/devtools/devtools_sanity_browsertest.cc

Issue 2503453003: Remove all calls to domAutomationController.setAutomationId.
Patch Set: Fix nacl_browsertest_util.cc Created 3 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
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 "<script src='blob_iframe.js'></script>" 1524 "<script src='blob_iframe.js'></script>"
1525 "</body></html>"); 1525 "</body></html>");
1526 // Creating blobs from chrome-extension:// origins is only permitted if the 1526 // Creating blobs from chrome-extension:// origins is only permitted if the
1527 // process has been granted permission to commit 'chrome-extension' schemes. 1527 // process has been granted permission to commit 'chrome-extension' schemes.
1528 dir->WriteFile( 1528 dir->WriteFile(
1529 FILE_PATH_LITERAL("blob_xhr.js"), 1529 FILE_PATH_LITERAL("blob_xhr.js"),
1530 "var blob_url = URL.createObjectURL(new Blob(['xhr blob contents']));\n" 1530 "var blob_url = URL.createObjectURL(new Blob(['xhr blob contents']));\n"
1531 "var xhr = new XMLHttpRequest();\n" 1531 "var xhr = new XMLHttpRequest();\n"
1532 "xhr.open('GET', blob_url, true);\n" 1532 "xhr.open('GET', blob_url, true);\n"
1533 "xhr.onload = function (e) {\n" 1533 "xhr.onload = function (e) {\n"
1534 " domAutomationController.setAutomationId(0);\n"
1535 " domAutomationController.send(xhr.response);\n" 1534 " domAutomationController.send(xhr.response);\n"
1536 "};\n" 1535 "};\n"
1537 "xhr.send(null);\n"); 1536 "xhr.send(null);\n");
1538 dir->WriteFile( 1537 dir->WriteFile(
1539 FILE_PATH_LITERAL("blob_iframe.js"), 1538 FILE_PATH_LITERAL("blob_iframe.js"),
1540 "var payload = `" 1539 "var payload = `"
1541 "<html><body>iframe blob contents" 1540 "<html><body>iframe blob contents"
1542 "<script>" 1541 "<script>"
1543 " domAutomationController.setAutomationId(0);"
1544 " domAutomationController.send(document.body.innerText);\n" 1542 " domAutomationController.send(document.body.innerText);\n"
1545 "</script></body></html>" 1543 "</script></body></html>"
1546 "`;" 1544 "`;"
1547 "document.body.appendChild(document.createElement('iframe')).src =" 1545 "document.body.appendChild(document.createElement('iframe')).src ="
1548 " URL.createObjectURL(new Blob([payload], {type: 'text/html'}));"); 1546 " URL.createObjectURL(new Blob([payload], {type: 'text/html'}));");
1549 // Install the extension. 1547 // Install the extension.
1550 const Extension* extension = LoadExtensionFromPath(dir->UnpackedPath()); 1548 const Extension* extension = LoadExtensionFromPath(dir->UnpackedPath());
1551 ASSERT_TRUE(extension); 1549 ASSERT_TRUE(extension);
1552 1550
1553 // Open a devtools window. 1551 // Open a devtools window.
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 RunTestFunction(window, "testWindowInitializedOnNavigateBack"); 2078 RunTestFunction(window, "testWindowInitializedOnNavigateBack");
2081 2079
2082 DevToolsWindowTesting::CloseDevToolsWindowSync(window); 2080 DevToolsWindowTesting::CloseDevToolsWindowSync(window);
2083 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory); 2081 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory);
2084 } 2082 }
2085 2083
2086 // Tests scripts panel showing. 2084 // Tests scripts panel showing.
2087 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) { 2085 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) {
2088 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL); 2086 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL);
2089 } 2087 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/test/oobe_base_test.cc ('k') | chrome/browser/geolocation/geolocation_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698