Chromium Code Reviews| Index: chrome/browser/chromeos/app_mode/kiosk_test_common.h |
| diff --git a/chrome/browser/chromeos/app_mode/kiosk_test_common.h b/chrome/browser/chromeos/app_mode/kiosk_test_common.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..927902fdda53ffb437736edc151b6077e53dfdda |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/app_mode/kiosk_test_common.h |
| @@ -0,0 +1,51 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_TEST_COMMON_H_ |
| +#define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_TEST_COMMON_H_ |
| + |
| +#include "net/test/embedded_test_server/http_request.h" |
| +#include "net/test/embedded_test_server/http_response.h" |
| +#include "url/gurl.h" |
| + |
| +using net::test_server::HttpRequest; |
| +using net::test_server::HttpResponse; |
| + |
| +namespace chromeos { |
| + |
| +class KioskTestCommon { |
|
xiyuan
2014/05/09 20:49:15
Let's move more stuff into this class and make a F
jennyz
2014/05/13 00:31:21
Done.
|
| + public: |
| + KioskTestCommon() {} |
| + virtual ~KioskTestCommon() {} |
| + |
| + protected: |
| + // Sets up |update_check_content_| used in update request response later by |
| + // kiosk app update server requeset handler |HandleRequest|. |
| + void SetUpdateCheckContent(const std::string& update_check_file, |
| + const GURL& crx_download_url, |
| + const std::string& app_id, |
| + const std::string& crx_fp, |
| + const std::string& crx_size, |
| + const std::string& version, |
| + std::string* update_check_content); |
| + |
| + // Request handler for kiosk app update server. |
| + scoped_ptr<HttpResponse> HandleRequest(const HttpRequest& request); |
| + |
| + // Sets up the kiosk app update response. |
| + void SetUpdateCrx(const GURL& webstore_url, |
| + const std::string& crx_donwload_path, |
| + const std::string& app_id, |
| + const std::string& crx_file, |
| + const std::string& version); |
| + |
| + std::string update_check_content_; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(KioskTestCommon); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_TEST_COMMON_H_ |