OLD | NEW |
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 <limits.h> | 5 #include <limits.h> |
6 #include <stddef.h> | 6 #include <stddef.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "apps/test/app_window_waiter.h" | 12 #include "apps/test/app_window_waiter.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/message_loop/message_loop.h" |
14 #include "base/strings/pattern.h" | 15 #include "base/strings/pattern.h" |
15 #include "base/strings/string_split.h" | 16 #include "base/strings/string_split.h" |
16 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
17 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
18 #include "base/values.h" | 19 #include "base/values.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
20 #include "chrome/browser/apps/app_browsertest_util.h" | 21 #include "chrome/browser/apps/app_browsertest_util.h" |
21 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
22 #include "chrome/browser/devtools/devtools_window_testing.h" | 23 #include "chrome/browser/devtools/devtools_window_testing.h" |
23 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 24 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2191 EXPECT_TRUE(ExecuteScriptAndExtractString( | 2192 EXPECT_TRUE(ExecuteScriptAndExtractString( |
2192 new_contents, | 2193 new_contents, |
2193 "var w = window.open('', 'old-contents');\n" | 2194 "var w = window.open('', 'old-contents');\n" |
2194 "window.domAutomationController.send(w.location.href);", | 2195 "window.domAutomationController.send(w.location.href);", |
2195 &location_of_other_window)); | 2196 &location_of_other_window)); |
2196 EXPECT_EQ(old_contents->GetMainFrame()->GetLastCommittedURL().spec(), | 2197 EXPECT_EQ(old_contents->GetMainFrame()->GetLastCommittedURL().spec(), |
2197 location_of_other_window); | 2198 location_of_other_window); |
2198 } | 2199 } |
2199 | 2200 |
2200 } // namespace extensions | 2201 } // namespace extensions |
OLD | NEW |