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 virtual void SetUpCommandLine(CommandLine* command_line) override; |
88 virtual void SetUpOnMainThread() OVERRIDE; | 88 virtual void SetUpOnMainThread() override; |
89 protected: | 89 protected: |
90 static KeyedService* BuildProfileSyncService( | 90 static KeyedService* BuildProfileSyncService( |
91 content::BrowserContext* profile); | 91 content::BrowserContext* profile); |
92 | 92 |
93 void CreateTestProfileSyncService(); | 93 void CreateTestProfileSyncService(); |
94 void CreateTestExtension(); | 94 void CreateTestExtension(); |
95 void CreateSessionModels(); | 95 void CreateSessionModels(); |
96 | 96 |
97 template <class T> | 97 template <class T> |
98 scoped_refptr<T> CreateFunction(bool has_callback) { | 98 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). | 360 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
361 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 361 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
362 return; | 362 return; |
363 #endif | 363 #endif |
364 | 364 |
365 ASSERT_TRUE(RunExtensionSubtest("sessions", | 365 ASSERT_TRUE(RunExtensionSubtest("sessions", |
366 "sessions.html")) << message_; | 366 "sessions.html")) << message_; |
367 } | 367 } |
368 | 368 |
369 } // namespace extensions | 369 } // namespace extensions |
OLD | NEW |