Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4844)

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_test_common.h

Issue 271263002: New test cases for kiosk app crx file cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698