| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 CHECK( | 65 CHECK( |
| 66 content::ExecuteScriptInFrameAndExtractString( | 66 content::ExecuteScriptInFrameAndExtractString( |
| 67 browser()->tab_strip_model()->GetActiveWebContents(), | 67 browser()->tab_strip_model()->GetActiveWebContents(), |
| 68 frame_xpath, | 68 frame_xpath, |
| 69 kGetAppRunningState, | 69 kGetAppRunningState, |
| 70 &result)); | 70 &result)); |
| 71 return result; | 71 return result; |
| 72 } | 72 } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 virtual void SetUpCommandLine(CommandLine* command_line) { | 75 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 76 ExtensionBrowserTest::SetUpCommandLine(command_line); | 76 ExtensionBrowserTest::SetUpCommandLine(command_line); |
| 77 command_line->AppendSwitchASCII(switches::kAppsCheckoutURL, | 77 command_line->AppendSwitchASCII(switches::kAppsCheckoutURL, |
| 78 "http://checkout.com:"); | 78 "http://checkout.com:"); |
| 79 } | 79 } |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 IN_PROC_BROWSER_TEST_F(ChromeAppAPITest, IsInstalled) { | 82 IN_PROC_BROWSER_TEST_F(ChromeAppAPITest, IsInstalled) { |
| 83 std::string app_host("app.com"); | 83 std::string app_host("app.com"); |
| 84 std::string nonapp_host("nonapp.com"); | 84 std::string nonapp_host("nonapp.com"); |
| 85 | 85 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 GURL non_app_url(test_file_url.ReplaceComponents(replace_host)); | 310 GURL non_app_url(test_file_url.ReplaceComponents(replace_host)); |
| 311 | 311 |
| 312 // Check the install and running state of a non-app iframe running | 312 // Check the install and running state of a non-app iframe running |
| 313 // within an app. | 313 // within an app. |
| 314 ui_test_utils::NavigateToURL(browser(), app_url); | 314 ui_test_utils::NavigateToURL(browser(), app_url); |
| 315 | 315 |
| 316 EXPECT_EQ("not_installed", InstallState("//html/iframe[1]")); | 316 EXPECT_EQ("not_installed", InstallState("//html/iframe[1]")); |
| 317 EXPECT_EQ("cannot_run", RunningState("//html/iframe[1]")); | 317 EXPECT_EQ("cannot_run", RunningState("//html/iframe[1]")); |
| 318 EXPECT_FALSE(IsAppInstalled("//html/iframe[1]")); | 318 EXPECT_FALSE(IsAppInstalled("//html/iframe[1]")); |
| 319 } | 319 } |
| OLD | NEW |