Commit 8451a04f authored by Lucía Cantú-Miller's avatar Lucía Cantú-Miller Committed by Commit Bot

[chromedriver] Code clean-up

Delete chrome/test/chromedriver/embed_extension_in_cpp.py, which is
not used anymore.
Edit chrome/test/chromedriver/chrome/navigation_tracker.cc, to
remove kAutomationExtensionBackgroundPage.

Bug: chromedriver:3376
Change-Id: Ia1a9c17263e682de7a57a826a0e1d7042ea6db02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367772Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800363}
parent f85ca2d3
......@@ -17,10 +17,6 @@
namespace {
const char kAutomationExtensionBackgroundPage[] =
"chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/"
"_generated_background_page.html";
// Match to content/browser/devtools/devTools_session const of same name
const char kTargetClosedMessage[] = "Inspected target navigated or closed";
......@@ -179,15 +175,7 @@ Status NavigationTracker::IsPendingNavigation(const Timeout* timeout,
*loading_state_ = kLoading;
return Status(kOk);
}
// If we're loading the ChromeDriver automation extension background page,
// look for a known function to determine the loading status.
if (base_url == kAutomationExtensionBackgroundPage) {
bool function_exists = false;
status = CheckFunctionExists(timeout, &function_exists);
if (status.IsError())
return MakeNavigationCheckFailedStatus(status);
*loading_state_ = function_exists ? kNotLoading : kLoading;
}
status = UpdateCurrentLoadingState();
if (status.code() == kNoSuchExecutionContext)
*loading_state_ = kLoading;
......
#!/usr/bin/env python
# Copyright 2013 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.
"""Embeds Chrome user data files in C++ code."""
import base64
import optparse
import os
import StringIO
import sys
import zipfile
import cpp_source
def main():
parser = optparse.OptionParser()
parser.add_option(
'', '--directory', type='string', default='.',
help='Path to directory where the cc/h file should be created')
options, args = parser.parse_args()
global_string_map = {}
string_buffer = StringIO.StringIO()
zipper = zipfile.ZipFile(string_buffer, 'w')
for f in args:
zipper.write(f, os.path.basename(f), zipfile.ZIP_STORED)
zipper.close()
global_string_map['kAutomationExtension'] = base64.b64encode(
string_buffer.getvalue())
string_buffer.close()
cpp_source.WriteSource('embedded_automation_extension',
'chrome/test/chromedriver/chrome',
options.directory, global_string_map)
if __name__ == '__main__':
sys.exit(main())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment