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

Unified Diff: chrome/test/chromedriver/chrome/page_load_strategy.h

Issue 2125123002: [chromedriver] Add page loading strategy to capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed unittests, renamed py tests Created 4 years, 4 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/test/chromedriver/chrome/page_load_strategy.h
diff --git a/chrome/test/chromedriver/chrome/page_load_strategy.h b/chrome/test/chromedriver/chrome/page_load_strategy.h
new file mode 100644
index 0000000000000000000000000000000000000000..03e29f7fa816c0b379efc4c667803c6789d5818a
--- /dev/null
+++ b/chrome/test/chromedriver/chrome/page_load_strategy.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2016 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_TEST_CHROMEDRIVER_CHROME_PAGE_LOAD_STRATEGY_H_
+#define CHROME_TEST_CHROMEDRIVER_CHROME_PAGE_LOAD_STRATEGY_H_
+
+#include "chrome/test/chromedriver/chrome/status.h"
+
+struct BrowserInfo;
+class DevToolsClient;
+class JavaScriptDialogManager;
+class Status;
+class Timeout;
+
+class PageLoadStrategy {
+
+public:
+ enum LoadingState {
+ kUnknown,
+ kLoading,
+ kNotLoading,
+ };
+
+ virtual ~PageLoadStrategy() {}
+
+ static PageLoadStrategy* Create(
+ std::string strategy,
+ DevToolsClient* client,
+ const BrowserInfo* browser_info,
+ const JavaScriptDialogManager* dialog_manager);
+
+ virtual Status IsPendingNavigation(const std::string& frame_id,
+ const Timeout* timeout,
+ bool* is_pending) = 0;
+
+ virtual void set_timed_out(bool timed_out) = 0;
+
+ // Types of page load strategies.
+ static const char kNormal[];
+ static const char kNone[];
+ static const char kEager[];
+};
+
+#endif // CHROME_TEST_CHROMEDRIVER_CHROME_PAGE_LOAD_STRATEGY_H_

Powered by Google App Engine
This is Rietveld 408576698