[email protected] | 3d83199 | 2013-07-04 01:13:29 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 7 | #include <map> |
| 8 | |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 9 | #include "base/command_line.h" |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 10 | #include "base/metrics/field_trial.h" |
mpearson | 3c6d7af | 2015-05-13 23:59:53 | [diff] [blame] | 11 | #include "base/strings/utf_string_conversions.h" |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 12 | #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 13 | #include "chrome/browser/ui/browser.h" |
| 14 | #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 15 | #include "chrome/test/base/browser_with_test_window_test.h" |
| 16 | #include "chrome/test/base/ui_test_utils.h" |
timvolodine | a47291a | 2015-01-23 14:04:43 | [diff] [blame] | 17 | #include "components/content_settings/core/browser/host_content_settings_map.h" |
[email protected] | bf5c532d | 2014-07-05 00:29:53 | [diff] [blame] | 18 | #include "components/search_engines/template_url_service.h" |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 19 | #include "components/variations/entropy_provider.h" |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 20 | #include "components/variations/variations_associated_data.h" |
sdefresne | 9fb6769 | 2015-08-03 18:48:22 | [diff] [blame^] | 21 | #include "components/version_info/version_info.h" |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 22 | #include "content/public/browser/navigation_controller.h" |
| 23 | #include "content/public/browser/navigation_entry.h" |
| 24 | #include "content/public/browser/web_contents.h" |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 25 | #include "content/public/common/content_switches.h" |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 26 | #include "content/public/test/test_browser_thread_bundle.h" |
[email protected] | 3d83199 | 2013-07-04 01:13:29 | [diff] [blame] | 27 | #include "testing/gtest/include/gtest/gtest.h" |
[email protected] | 5f5ef80 | 2013-07-04 16:11:13 | [diff] [blame] | 28 | #include "url/gurl.h" |
[email protected] | 3d83199 | 2013-07-04 01:13:29 | [diff] [blame] | 29 | |
| 30 | namespace chrome { |
| 31 | |
mlamouri | eb40d55 | 2015-02-05 00:57:08 | [diff] [blame] | 32 | using ChromeContentBrowserClientTest = testing::Test; |
[email protected] | 3d83199 | 2013-07-04 01:13:29 | [diff] [blame] | 33 | |
[email protected] | 3d83199 | 2013-07-04 01:13:29 | [diff] [blame] | 34 | TEST_F(ChromeContentBrowserClientTest, ShouldAssignSiteForURL) { |
| 35 | ChromeContentBrowserClient client; |
| 36 | EXPECT_FALSE(client.ShouldAssignSiteForURL(GURL("chrome-native://test"))); |
| 37 | EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("http://www.google.com"))); |
| 38 | EXPECT_TRUE(client.ShouldAssignSiteForURL(GURL("https://www.google.com"))); |
| 39 | } |
| 40 | |
mlamouri | eb40d55 | 2015-02-05 00:57:08 | [diff] [blame] | 41 | // BrowserWithTestWindowTest doesn't work on iOS and Android. |
| 42 | #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 43 | |
peter | bbcccc1 | 2015-02-11 22:23:33 | [diff] [blame] | 44 | using ChromeContentBrowserClientWindowTest = BrowserWithTestWindowTest; |
| 45 | |
| 46 | static void DidOpenURLForWindowTest(content::WebContents** target_contents, |
| 47 | content::WebContents* opened_contents) { |
| 48 | DCHECK(target_contents); |
| 49 | |
| 50 | *target_contents = opened_contents; |
| 51 | } |
| 52 | |
mlamouri | eb40d55 | 2015-02-05 00:57:08 | [diff] [blame] | 53 | // This test opens two URLs using ContentBrowserClient::OpenURL. It expects the |
| 54 | // URLs to be opened in new tabs and activated, changing the active tabs after |
| 55 | // each call and increasing the tab count by 2. |
| 56 | TEST_F(ChromeContentBrowserClientWindowTest, OpenURL) { |
| 57 | ChromeContentBrowserClient client; |
| 58 | |
| 59 | int previous_count = browser()->tab_strip_model()->count(); |
| 60 | |
| 61 | GURL urls[] = { GURL("https://www.google.com"), |
| 62 | GURL("https://www.chromium.org") }; |
| 63 | |
| 64 | for (const GURL& url : urls) { |
| 65 | content::OpenURLParams params(url, |
| 66 | content::Referrer(), |
| 67 | NEW_FOREGROUND_TAB, |
| 68 | ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 69 | false); |
peter | bbcccc1 | 2015-02-11 22:23:33 | [diff] [blame] | 70 | // TODO(peter): We should have more in-depth browser tests for the window |
| 71 | // opening functionality, which also covers Android. This test can currently |
| 72 | // only be ran on platforms where OpenURL is implemented synchronously. |
| 73 | // See https://crbug.com/457667. |
| 74 | content::WebContents* web_contents = nullptr; |
| 75 | client.OpenURL(browser()->profile(), |
| 76 | params, |
| 77 | base::Bind(&DidOpenURLForWindowTest, &web_contents)); |
| 78 | |
| 79 | EXPECT_TRUE(web_contents); |
mlamouri | eb40d55 | 2015-02-05 00:57:08 | [diff] [blame] | 80 | |
| 81 | content::WebContents* active_contents = browser()->tab_strip_model()-> |
| 82 | GetActiveWebContents(); |
peter | bbcccc1 | 2015-02-11 22:23:33 | [diff] [blame] | 83 | EXPECT_EQ(web_contents, active_contents); |
mlamouri | eb40d55 | 2015-02-05 00:57:08 | [diff] [blame] | 84 | EXPECT_EQ(url, active_contents->GetVisibleURL()); |
| 85 | } |
| 86 | |
| 87 | EXPECT_EQ(previous_count + 2, browser()->tab_strip_model()->count()); |
| 88 | } |
| 89 | |
| 90 | #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
| 91 | |
brettw | a68ea2b | 2015-02-01 02:54:07 | [diff] [blame] | 92 | #if defined(ENABLE_WEBRTC) |
| 93 | |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 94 | // NOTE: Any updates to the expectations in these tests should also be done in |
| 95 | // the browser test WebRtcDisableEncryptionFlagBrowserTest. |
| 96 | class DisableWebRtcEncryptionFlagTest : public testing::Test { |
| 97 | public: |
| 98 | DisableWebRtcEncryptionFlagTest() |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 99 | : from_command_line_(base::CommandLine::NO_PROGRAM), |
| 100 | to_command_line_(base::CommandLine::NO_PROGRAM) {} |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 101 | |
| 102 | protected: |
dcheng | e1bc798 | 2014-10-30 00:32:40 | [diff] [blame] | 103 | void SetUp() override { |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 104 | from_command_line_.AppendSwitch(switches::kDisableWebRtcEncryption); |
| 105 | } |
| 106 | |
sdefresne | 6e883e4 | 2015-07-30 08:05:54 | [diff] [blame] | 107 | void MaybeCopyDisableWebRtcEncryptionSwitch(version_info::Channel channel) { |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 108 | ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch( |
| 109 | &to_command_line_, |
| 110 | from_command_line_, |
| 111 | channel); |
| 112 | } |
| 113 | |
avi | 3ef9ec9e | 2014-12-22 22:50:17 | [diff] [blame] | 114 | base::CommandLine from_command_line_; |
| 115 | base::CommandLine to_command_line_; |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 116 | |
| 117 | DISALLOW_COPY_AND_ASSIGN(DisableWebRtcEncryptionFlagTest); |
| 118 | }; |
| 119 | |
| 120 | TEST_F(DisableWebRtcEncryptionFlagTest, UnknownChannel) { |
sdefresne | 6e883e4 | 2015-07-30 08:05:54 | [diff] [blame] | 121 | MaybeCopyDisableWebRtcEncryptionSwitch(version_info::Channel::UNKNOWN); |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 122 | EXPECT_TRUE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
| 123 | } |
| 124 | |
| 125 | TEST_F(DisableWebRtcEncryptionFlagTest, CanaryChannel) { |
sdefresne | 6e883e4 | 2015-07-30 08:05:54 | [diff] [blame] | 126 | MaybeCopyDisableWebRtcEncryptionSwitch(version_info::Channel::CANARY); |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 127 | EXPECT_TRUE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
| 128 | } |
| 129 | |
| 130 | TEST_F(DisableWebRtcEncryptionFlagTest, DevChannel) { |
sdefresne | 6e883e4 | 2015-07-30 08:05:54 | [diff] [blame] | 131 | MaybeCopyDisableWebRtcEncryptionSwitch(version_info::Channel::DEV); |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 132 | EXPECT_TRUE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
| 133 | } |
| 134 | |
| 135 | TEST_F(DisableWebRtcEncryptionFlagTest, BetaChannel) { |
sdefresne | 6e883e4 | 2015-07-30 08:05:54 | [diff] [blame] | 136 | MaybeCopyDisableWebRtcEncryptionSwitch(version_info::Channel::BETA); |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 137 | #if defined(OS_ANDROID) |
| 138 | EXPECT_TRUE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
| 139 | #else |
| 140 | EXPECT_FALSE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
| 141 | #endif |
| 142 | } |
| 143 | |
| 144 | TEST_F(DisableWebRtcEncryptionFlagTest, StableChannel) { |
sdefresne | 6e883e4 | 2015-07-30 08:05:54 | [diff] [blame] | 145 | MaybeCopyDisableWebRtcEncryptionSwitch(version_info::Channel::STABLE); |
[email protected] | 30335fdf0 | 2014-02-26 19:51:27 | [diff] [blame] | 146 | EXPECT_FALSE(to_command_line_.HasSwitch(switches::kDisableWebRtcEncryption)); |
| 147 | } |
| 148 | |
brettw | a68ea2b | 2015-02-01 02:54:07 | [diff] [blame] | 149 | #endif // ENABLE_WEBRTC |
| 150 | |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 151 | class BlinkSettingsFieldTrialTest : public testing::Test { |
| 152 | public: |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 153 | static const char kParserFieldTrialName[]; |
| 154 | static const char kIFrameFieldTrialName[]; |
| 155 | |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 156 | BlinkSettingsFieldTrialTest() |
| 157 | : trial_list_(NULL), |
| 158 | command_line_(base::CommandLine::NO_PROGRAM) {} |
| 159 | |
| 160 | void SetUp() override { |
| 161 | command_line_.AppendSwitchASCII( |
| 162 | switches::kProcessType, switches::kRendererProcess); |
| 163 | } |
| 164 | |
| 165 | void TearDown() override { |
| 166 | variations::testing::ClearAllVariationParams(); |
| 167 | } |
| 168 | |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 169 | void CreateFieldTrial(const char* trial_name) { |
| 170 | base::FieldTrialList::CreateFieldTrial(trial_name, kGroupName); |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 171 | } |
| 172 | |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 173 | void CreateFieldTrialWithParams( |
| 174 | const char* trial_name, |
| 175 | const char* key1, const char* value1, |
| 176 | const char* key2, const char* value2) { |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 177 | std::map<std::string, std::string> params; |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 178 | params.insert(std::make_pair(key1, value1)); |
| 179 | params.insert(std::make_pair(key2, value2)); |
| 180 | CreateFieldTrial(trial_name); |
| 181 | variations::AssociateVariationParams(trial_name, kGroupName, params); |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | void AppendContentBrowserClientSwitches() { |
| 185 | client_.AppendExtraCommandLineSwitches(&command_line_, kFakeChildProcessId); |
| 186 | } |
| 187 | |
| 188 | const base::CommandLine& command_line() const { |
| 189 | return command_line_; |
| 190 | } |
| 191 | |
| 192 | void AppendBlinkSettingsSwitch(const char* value) { |
| 193 | command_line_.AppendSwitchASCII(switches::kBlinkSettings, value); |
| 194 | } |
| 195 | |
| 196 | private: |
| 197 | static const int kFakeChildProcessId = 1; |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 198 | static const char kGroupName[]; |
| 199 | |
| 200 | ChromeContentBrowserClient client_; |
| 201 | base::FieldTrialList trial_list_; |
| 202 | base::CommandLine command_line_; |
| 203 | |
| 204 | content::TestBrowserThreadBundle thread_bundle_; |
| 205 | }; |
| 206 | |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 207 | const char BlinkSettingsFieldTrialTest::kParserFieldTrialName[] = |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 208 | "BackgroundHtmlParserTokenLimits"; |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 209 | const char BlinkSettingsFieldTrialTest::kIFrameFieldTrialName[] = |
| 210 | "LowPriorityIFrames"; |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 211 | const char BlinkSettingsFieldTrialTest::kGroupName[] = "FakeGroup"; |
| 212 | |
| 213 | TEST_F(BlinkSettingsFieldTrialTest, NoFieldTrial) { |
| 214 | AppendContentBrowserClientSwitches(); |
| 215 | EXPECT_FALSE(command_line().HasSwitch(switches::kBlinkSettings)); |
| 216 | } |
| 217 | |
| 218 | TEST_F(BlinkSettingsFieldTrialTest, FieldTrialWithoutParams) { |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 219 | CreateFieldTrial(kParserFieldTrialName); |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 220 | AppendContentBrowserClientSwitches(); |
| 221 | EXPECT_FALSE(command_line().HasSwitch(switches::kBlinkSettings)); |
| 222 | } |
| 223 | |
| 224 | TEST_F(BlinkSettingsFieldTrialTest, BlinkSettingsSwitchAlreadySpecified) { |
| 225 | AppendBlinkSettingsSwitch("foo"); |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 226 | CreateFieldTrialWithParams(kParserFieldTrialName, |
| 227 | "key1", "value1", "key2", "value2"); |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 228 | AppendContentBrowserClientSwitches(); |
| 229 | EXPECT_TRUE(command_line().HasSwitch(switches::kBlinkSettings)); |
| 230 | EXPECT_EQ("foo", |
| 231 | command_line().GetSwitchValueASCII(switches::kBlinkSettings)); |
| 232 | } |
| 233 | |
| 234 | TEST_F(BlinkSettingsFieldTrialTest, FieldTrialEnabled) { |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 235 | CreateFieldTrialWithParams(kParserFieldTrialName, |
| 236 | "key1", "value1", "key2", "value2"); |
bmcquade | 5d2d9cf3 | 2015-06-19 17:42:28 | [diff] [blame] | 237 | AppendContentBrowserClientSwitches(); |
| 238 | EXPECT_TRUE(command_line().HasSwitch(switches::kBlinkSettings)); |
| 239 | EXPECT_EQ("key1=value1,key2=value2", |
| 240 | command_line().GetSwitchValueASCII(switches::kBlinkSettings)); |
| 241 | } |
| 242 | |
bmcquade | 9dd54cc | 2015-06-22 16:56:52 | [diff] [blame] | 243 | TEST_F(BlinkSettingsFieldTrialTest, MultipleFieldTrialsEnabled) { |
| 244 | CreateFieldTrialWithParams(kParserFieldTrialName, |
| 245 | "key1", "value1", "key2", "value2"); |
| 246 | CreateFieldTrialWithParams(kIFrameFieldTrialName, |
| 247 | "keyA", "valueA", "keyB", "valueB"); |
| 248 | AppendContentBrowserClientSwitches(); |
| 249 | EXPECT_TRUE(command_line().HasSwitch(switches::kBlinkSettings)); |
| 250 | EXPECT_EQ("key1=value1,key2=value2,keyA=valueA,keyB=valueB", |
| 251 | command_line().GetSwitchValueASCII(switches::kBlinkSettings)); |
| 252 | } |
| 253 | |
| 254 | TEST_F(BlinkSettingsFieldTrialTest, MultipleFieldTrialsDuplicateKeys) { |
| 255 | CreateFieldTrialWithParams(kParserFieldTrialName, |
| 256 | "key1", "value1", "key2", "value2"); |
| 257 | CreateFieldTrialWithParams(kIFrameFieldTrialName, |
| 258 | "key2", "duplicate", "key3", "value3"); |
| 259 | AppendContentBrowserClientSwitches(); |
| 260 | EXPECT_TRUE(command_line().HasSwitch(switches::kBlinkSettings)); |
| 261 | EXPECT_EQ("key1=value1,key2=value2,key2=duplicate,key3=value3", |
| 262 | command_line().GetSwitchValueASCII(switches::kBlinkSettings)); |
| 263 | } |
| 264 | |
[email protected] | 3d83199 | 2013-07-04 01:13:29 | [diff] [blame] | 265 | } // namespace chrome |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 266 | |
| 267 | #if !defined(OS_IOS) && !defined(OS_ANDROID) |
| 268 | namespace content { |
| 269 | |
| 270 | class InstantNTPURLRewriteTest : public BrowserWithTestWindowTest { |
| 271 | protected: |
dcheng | e1bc798 | 2014-10-30 00:32:40 | [diff] [blame] | 272 | void SetUp() override { |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 273 | BrowserWithTestWindowTest::SetUp(); |
| 274 | field_trial_list_.reset(new base::FieldTrialList( |
| 275 | new metrics::SHA1EntropyProvider("42"))); |
| 276 | } |
| 277 | |
| 278 | void InstallTemplateURLWithNewTabPage(GURL new_tab_page_url) { |
| 279 | TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 280 | profile(), &TemplateURLServiceFactory::BuildInstanceFor); |
| 281 | TemplateURLService* template_url_service = |
| 282 | TemplateURLServiceFactory::GetForProfile(browser()->profile()); |
| 283 | ui_test_utils::WaitForTemplateURLServiceToLoad(template_url_service); |
| 284 | |
| 285 | TemplateURLData data; |
mpearson | 3c6d7af | 2015-05-13 23:59:53 | [diff] [blame] | 286 | data.SetShortName(base::ASCIIToUTF16("foo.com")); |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 287 | data.SetURL("http://foo.com/url?bar={searchTerms}"); |
| 288 | data.new_tab_url = new_tab_page_url.spec(); |
[email protected] | 168d0872 | 2014-06-18 07:13:28 | [diff] [blame] | 289 | TemplateURL* template_url = new TemplateURL(data); |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 290 | // Takes ownership. |
| 291 | template_url_service->Add(template_url); |
[email protected] | f1cb558 | 2014-04-25 07:35:26 | [diff] [blame] | 292 | template_url_service->SetUserSelectedDefaultSearchProvider(template_url); |
[email protected] | 10a9bf9 | 2013-11-13 23:34:48 | [diff] [blame] | 293 | } |
| 294 | |
| 295 | scoped_ptr<base::FieldTrialList> field_trial_list_; |
| 296 | }; |
| 297 | |
| 298 | TEST_F(InstantNTPURLRewriteTest, UberURLHandler_InstantExtendedNewTabPage) { |
| 299 | const GURL url_original("chrome://newtab"); |
| 300 | const GURL url_rewritten("https://www.example.com/newtab"); |
| 301 | InstallTemplateURLWithNewTabPage(url_rewritten); |
| 302 | ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial("InstantExtended", |
| 303 | "Group1 use_cacheable_ntp:1")); |
| 304 | |
| 305 | AddTab(browser(), GURL("chrome://blank")); |
| 306 | NavigateAndCommitActiveTab(url_original); |
| 307 | |
| 308 | NavigationEntry* entry = browser()->tab_strip_model()-> |
| 309 | GetActiveWebContents()->GetController().GetLastCommittedEntry(); |
| 310 | ASSERT_TRUE(entry != NULL); |
| 311 | EXPECT_EQ(url_rewritten, entry->GetURL()); |
| 312 | EXPECT_EQ(url_original, entry->GetVirtualURL()); |
| 313 | } |
| 314 | |
| 315 | } // namespace content |
| 316 | #endif // !defined(OS_IOS) && !defined(OS_ANDROID) |