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 "chrome/browser/extensions/extension_tabs_module.h" | 5 #include "chrome/browser/extensions/api/tabs/tabs.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" |
14 #include "chrome/browser/extensions/extension_function_test_utils.h" | 15 #include "chrome/browser/extensions/extension_function_test_utils.h" |
15 #include "chrome/browser/extensions/extension_tabs_module_constants.h" | |
16 #include "chrome/browser/extensions/extension_tab_util.h" | 16 #include "chrome/browser/extensions/extension_tab_util.h" |
17 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 17 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
20 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
21 #include "chrome/test/base/in_process_browser_test.h" | 21 #include "chrome/test/base/in_process_browser_test.h" |
22 #include "chrome/test/base/ui_test_utils.h" | 22 #include "chrome/test/base/ui_test_utils.h" |
23 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
24 | 24 |
25 namespace keys = extension_tabs_module_constants; | 25 namespace keys = extensions::tabs_constants; |
26 namespace utils = extension_function_test_utils; | 26 namespace utils = extension_function_test_utils; |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 class ExtensionTabsTest : public InProcessBrowserTest { | 30 class ExtensionTabsTest : public InProcessBrowserTest { |
31 }; | 31 }; |
32 } | 32 } |
33 | 33 |
34 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetWindow) { | 34 IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, GetWindow) { |
35 int window_id = ExtensionTabUtil::GetWindowId(browser()); | 35 int window_id = ExtensionTabUtil::GetWindowId(browser()); |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 530 |
531 static const char kArgsMaximizedWithBounds[] = | 531 static const char kArgsMaximizedWithBounds[] = |
532 "[%u, {\"state\": \"maximized\", \"width\": 500}]"; | 532 "[%u, {\"state\": \"maximized\", \"width\": 500}]"; |
533 EXPECT_TRUE(MatchPattern( | 533 EXPECT_TRUE(MatchPattern( |
534 utils::RunFunctionAndReturnError( | 534 utils::RunFunctionAndReturnError( |
535 new UpdateWindowFunction(), | 535 new UpdateWindowFunction(), |
536 base::StringPrintf(kArgsMaximizedWithBounds, window_id), | 536 base::StringPrintf(kArgsMaximizedWithBounds, window_id), |
537 browser()), | 537 browser()), |
538 keys::kInvalidWindowStateError)); | 538 keys::kInvalidWindowStateError)); |
539 } | 539 } |
OLD | NEW |