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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/automation/automation_util.h" | 8 #include "chrome/browser/automation/automation_util.h" |
9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
10 #include "chrome/browser/extensions/extension_browsertest.h" | 10 #include "chrome/browser/extensions/extension_browsertest.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 protected: | 58 protected: |
59 void LoadAndLaunchPlatformApp(const char* name) { | 59 void LoadAndLaunchPlatformApp(const char* name) { |
60 ui_test_utils::WindowedNotificationObserver app_loaded_observer( | 60 ui_test_utils::WindowedNotificationObserver app_loaded_observer( |
61 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 61 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
62 content::NotificationService::AllSources()); | 62 content::NotificationService::AllSources()); |
63 | 63 |
64 EXPECT_TRUE(LoadExtension(test_data_dir_.AppendASCII("platform_apps"). | 64 EXPECT_TRUE(LoadExtension(test_data_dir_.AppendASCII("platform_apps"). |
65 AppendASCII(name))); | 65 AppendASCII(name))); |
66 | 66 |
67 ExtensionService* service = browser()->profile()->GetExtensionService(); | 67 ExtensionService* service = browser()->profile()->GetExtensionService(); |
68 const Extension* extension = service->GetExtensionById( | 68 const extensions::Extension* extension = service->GetExtensionById( |
69 last_loaded_extension_id_, false); | 69 last_loaded_extension_id_, false); |
70 EXPECT_TRUE(extension); | 70 EXPECT_TRUE(extension); |
71 | 71 |
72 Browser::OpenApplication( | 72 Browser::OpenApplication( |
73 browser()->profile(), | 73 browser()->profile(), |
74 extension, | 74 extension, |
75 extension_misc::LAUNCH_NONE, | 75 extension_misc::LAUNCH_NONE, |
76 GURL(), | 76 GURL(), |
77 NEW_WINDOW); | 77 NEW_WINDOW); |
78 | 78 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 set_cookie_url, | 186 set_cookie_url, |
187 browser()->GetWebContentsAt(0), | 187 browser()->GetWebContentsAt(0), |
188 &cookie_size, | 188 &cookie_size, |
189 &cookie_value); | 189 &cookie_value); |
190 ASSERT_EQ("testCookie=1", cookie_value); | 190 ASSERT_EQ("testCookie=1", cookie_value); |
191 | 191 |
192 // Let the platform app request the same URL, and make sure that it doesn't | 192 // Let the platform app request the same URL, and make sure that it doesn't |
193 // see the cookie. | 193 // see the cookie. |
194 ASSERT_TRUE(RunPlatformAppTest("platform_apps/isolation")) << message_; | 194 ASSERT_TRUE(RunPlatformAppTest("platform_apps/isolation")) << message_; |
195 } | 195 } |
OLD | NEW |