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/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_process_manager.h" | 9 #include "chrome/browser/extensions/extension_process_manager.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 ResultCatcher catcher; | 56 ResultCatcher catcher; |
57 host->render_view_host()->ExecuteJavascriptInWebFrame(string16(), command); | 57 host->render_view_host()->ExecuteJavascriptInWebFrame(string16(), command); |
58 EXPECT_TRUE(catcher.GetNextResult()) << message_; | 58 EXPECT_TRUE(catcher.GetNextResult()) << message_; |
59 } | 59 } |
60 | 60 |
61 void AttachFakeDevice() { | 61 void AttachFakeDevice() { |
62 device_id_ = chrome::StorageInfo::MakeDeviceId( | 62 device_id_ = chrome::StorageInfo::MakeDeviceId( |
63 chrome::StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM, kDeviceId); | 63 chrome::StorageInfo::REMOVABLE_MASS_STORAGE_WITH_DCIM, kDeviceId); |
64 | 64 |
65 chrome::StorageMonitor::GetInstance()->receiver()->ProcessAttach( | 65 chrome::StorageMonitor::GetInstance()->receiver()->ProcessAttach( |
66 chrome::StorageInfo(device_id_, string16(), kDevicePath, | 66 chrome::StorageInfo(device_id_, kDevicePath, |
67 ASCIIToUTF16(kDeviceName), | 67 base::ASCIIToUTF16(kDeviceName), base::string16(), |
68 string16(), string16(), 0)); | 68 base::string16(), 0)); |
69 content::RunAllPendingInMessageLoop(); | 69 content::RunAllPendingInMessageLoop(); |
70 } | 70 } |
71 | 71 |
72 void DetachFakeDevice() { | 72 void DetachFakeDevice() { |
73 chrome::StorageMonitor::GetInstance()->receiver()->ProcessDetach( | 73 chrome::StorageMonitor::GetInstance()->receiver()->ProcessDetach( |
74 device_id_); | 74 device_id_); |
75 content::RunAllPendingInMessageLoop(); | 75 content::RunAllPendingInMessageLoop(); |
76 } | 76 } |
77 | 77 |
78 private: | 78 private: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 chrome::EnsureMediaDirectoriesExists media_directories; | 124 chrome::EnsureMediaDirectoriesExists media_directories; |
125 ASSERT_TRUE(RunPlatformAppTest("api_test/media_galleries/metadata")) | 125 ASSERT_TRUE(RunPlatformAppTest("api_test/media_galleries/metadata")) |
126 << message_; | 126 << message_; |
127 } | 127 } |
128 | 128 |
129 | 129 |
130 IN_PROC_BROWSER_TEST_F(MediaGalleriesExperimentalApiTest, | 130 IN_PROC_BROWSER_TEST_F(MediaGalleriesExperimentalApiTest, |
131 ExperimentalMediaGalleries) { | 131 ExperimentalMediaGalleries) { |
132 ASSERT_TRUE(RunExtensionTest("media_galleries/experimental")) << message_; | 132 ASSERT_TRUE(RunExtensionTest("media_galleries/experimental")) << message_; |
133 } | 133 } |
OLD | NEW |