OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/api/sessions/sessions_api.h" | 5 #include "chrome/browser/extensions/api/sessions/sessions_api.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 10 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 navigation->set_virtual_url("http://foo/1"); | 77 navigation->set_virtual_url("http://foo/1"); |
78 navigation->set_referrer("referrer"); | 78 navigation->set_referrer("referrer"); |
79 navigation->set_title("title"); | 79 navigation->set_title("title"); |
80 navigation->set_page_transition(sync_pb::SyncEnums_PageTransition_TYPED); | 80 navigation->set_page_transition(sync_pb::SyncEnums_PageTransition_TYPED); |
81 } | 81 } |
82 | 82 |
83 } // namespace | 83 } // namespace |
84 | 84 |
85 class ExtensionSessionsTest : public InProcessBrowserTest { | 85 class ExtensionSessionsTest : public InProcessBrowserTest { |
86 public: | 86 public: |
87 virtual void SetUpCommandLine(CommandLine* command_line) override; | 87 void SetUpCommandLine(CommandLine* command_line) override; |
88 virtual void SetUpOnMainThread() override; | 88 void SetUpOnMainThread() override; |
| 89 |
89 protected: | 90 protected: |
90 static KeyedService* BuildProfileSyncService( | 91 static KeyedService* BuildProfileSyncService( |
91 content::BrowserContext* profile); | 92 content::BrowserContext* profile); |
92 | 93 |
93 void CreateTestProfileSyncService(); | 94 void CreateTestProfileSyncService(); |
94 void CreateTestExtension(); | 95 void CreateTestExtension(); |
95 void CreateSessionModels(); | 96 void CreateSessionModels(); |
96 | 97 |
97 template <class T> | 98 template <class T> |
98 scoped_refptr<T> CreateFunction(bool has_callback) { | 99 scoped_refptr<T> CreateFunction(bool has_callback) { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 361 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
361 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 362 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
362 return; | 363 return; |
363 #endif | 364 #endif |
364 | 365 |
365 ASSERT_TRUE(RunExtensionSubtest("sessions", | 366 ASSERT_TRUE(RunExtensionSubtest("sessions", |
366 "sessions.html")) << message_; | 367 "sessions.html")) << message_; |
367 } | 368 } |
368 | 369 |
369 } // namespace extensions | 370 } // namespace extensions |
OLD | NEW |