| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/test/scoped_feature_list.h" | 10 #include "base/test/scoped_feature_list.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 class HostedAppTest : public ExtensionBrowserTest { | 56 class HostedAppTest : public ExtensionBrowserTest { |
| 57 public: | 57 public: |
| 58 HostedAppTest() : app_browser_(nullptr) {} | 58 HostedAppTest() : app_browser_(nullptr) {} |
| 59 ~HostedAppTest() override {} | 59 ~HostedAppTest() override {} |
| 60 | 60 |
| 61 // testing::Test: | 61 // testing::Test: |
| 62 void SetUp() override { | 62 void SetUp() override { |
| 63 ExtensionBrowserTest::SetUp(); | |
| 64 #if defined(OS_MACOSX) | 63 #if defined(OS_MACOSX) |
| 65 scoped_feature_list_.InitAndEnableFeature(features::kBookmarkApps); | 64 scoped_feature_list_.InitAndEnableFeature(features::kBookmarkApps); |
| 66 #endif | 65 #endif |
| 66 ExtensionBrowserTest::SetUp(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 protected: | 69 protected: |
| 70 void SetupApp(const std::string& app_folder, bool is_bookmark_app) { | 70 void SetupApp(const std::string& app_folder, bool is_bookmark_app) { |
| 71 SetupApp(test_data_dir_.AppendASCII(app_folder), is_bookmark_app); | 71 SetupApp(test_data_dir_.AppendASCII(app_folder), is_bookmark_app); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void SetupApp(const base::FilePath& app_folder, bool is_bookmark_app) { | 74 void SetupApp(const base::FilePath& app_folder, bool is_bookmark_app) { |
| 75 const Extension* app = InstallExtensionWithSourceAndFlags( | 75 const Extension* app = InstallExtensionWithSourceAndFlags( |
| 76 app_folder, 1, extensions::Manifest::INTERNAL, | 76 app_folder, 1, extensions::Manifest::INTERNAL, |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 } else { | 342 } else { |
| 343 // TODO(lukasza): https://crbug.com/718516: Process policy is not | 343 // TODO(lukasza): https://crbug.com/718516: Process policy is not |
| 344 // well-defined / settled wrt relationship between 1) hosted apps and 2) | 344 // well-defined / settled wrt relationship between 1) hosted apps and 2) |
| 345 // same-site web content outside of hosted app's extent. When this test was | 345 // same-site web content outside of hosted app's extent. When this test was |
| 346 // authored --site-per-process would put |app| in a separate renderer | 346 // authored --site-per-process would put |app| in a separate renderer |
| 347 // process from |diff_dir| and |same_site|, even though such process | 347 // process from |diff_dir| and |same_site|, even though such process |
| 348 // placement can be problematic (if |app| tries to synchronously script | 348 // placement can be problematic (if |app| tries to synchronously script |
| 349 // |diff_dir| and/or |same_site|). | 349 // |diff_dir| and/or |same_site|). |
| 350 } | 350 } |
| 351 } | 351 } |
| OLD | NEW |