Commit 74478188 authored by Mike Baxley's avatar Mike Baxley Committed by Commit Bot

Make test that shows header on child tab close assert expected error.

FullscreenTestCase.testShowHeaderWhenChildTabCloses results in an
error when the child tab is closed, because the web view is invlaidated.
this behavior is expected, and should be verified. Add a helper to
tap on a web view element, which can return an NSError.

Bug: 807789
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I401319a1c19af60cdfd71e4fc6a75f36153e954b
Reviewed-on: https://chromium-review.googlesource.com/902792
Commit-Queue: Mike Baxley <baxley@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534849}
parent a91c371d
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#import "ios/chrome/test/app/settings_test_util.h" #import "ios/chrome/test/app/settings_test_util.h"
#import "ios/chrome/test/app/tab_test_util.h" #import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_actions.h" #import "ios/chrome/test/earl_grey/chrome_actions.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#import "ios/chrome/test/app/histogram_test_util.h" #import "ios/chrome/test/app/histogram_test_util.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#import "ios/chrome/test/app/tab_test_util.h" #import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_actions.h" #import "ios/chrome/test/earl_grey/chrome_actions.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "ios/chrome/browser/ui/translate/language_selection_view_controller.h" #include "ios/chrome/browser/ui/translate/language_selection_view_controller.h"
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#import "ios/chrome/test/app/tab_test_util.h" #import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -295,7 +295,17 @@ void AssertURLIs(const GURL& expectedURL) { ...@@ -295,7 +295,17 @@ void AssertURLIs(const GURL& expectedURL) {
[ChromeEarlGreyUI waitForToolbarVisible:NO]; [ChromeEarlGreyUI waitForToolbarVisible:NO];
// Close the tab. // Close the tab.
chrome_test_util::TapWebViewElementWithId("link2"); NSError* error = nil;
// The effect of clicking the link, closes the tab and invalidates the web
// view. This results in |TapWebViewElementWithId| returning false. This
// error is represented by code 3.
GREYAssertFalse(chrome_test_util::TapWebViewElementWithId("link2", &error),
@"Failed to tap \"link2\"");
GREYAssert(error.code == 3,
@"Failed to receive WKErrorWebViewInvalidated error");
GREYAssert([error.domain isEqualToString:@"WKErrorDomain"],
@"Failed to receive WKErrorDomain error");
[ChromeEarlGrey waitForWebViewContainingText:"link1"]; [ChromeEarlGrey waitForWebViewContainingText:"link1"];
// Make sure the toolbar is on the screen. // Make sure the toolbar is on the screen.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "base/mac/bind_objc_block.h" #import "base/mac/bind_objc_block.h"
#include "ios/chrome/browser/ui/tools_menu/public/tools_menu_constants.h" #include "ios/chrome/browser/ui/tools_menu/public/tools_menu_constants.h"
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#include "ios/chrome/test/earl_grey/accessibility_util.h" #include "ios/chrome/test/earl_grey/accessibility_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#include "ios/chrome/test/earl_grey/accessibility_util.h" #include "ios/chrome/test/earl_grey/accessibility_util.h"
#import "ios/chrome/test/earl_grey/chrome_actions.h" #import "ios/chrome/test/earl_grey/chrome_actions.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#import "ios/chrome/test/app/tab_test_util.h" #import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#include "ios/chrome/test/earl_grey/accessibility_util.h" #include "ios/chrome/test/earl_grey/accessibility_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "ios/chrome/browser/experimental_flags.h" #include "ios/chrome/browser/experimental_flags.h"
#import "ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h" #import "ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/history_test_util.h" #include "ios/chrome/test/app/history_test_util.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings.h"
#include "ios/chrome/test/app/settings_test_util.h" #include "ios/chrome/test/app/settings_test_util.h"
#import "ios/chrome/test/app/tab_test_util.h" #import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "ios/chrome/browser/ui/ui_util.h" #include "ios/chrome/browser/ui/ui_util.h"
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/ios/ios_util.h" #include "base/ios/ios_util.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h" #import "ios/chrome/browser/ui/uikit_ui_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "ios/chrome/browser/ui/ui_util.h" #include "ios/chrome/browser/ui/ui_util.h"
#include "ios/chrome/test/app/navigation_test_util.h" #include "ios/chrome/test/app/navigation_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_ui.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
#include "ios/chrome/test/app/settings_test_util.h" #include "ios/chrome/test/app/settings_test_util.h"
#import "ios/chrome/test/app/tab_test_util.h" #import "ios/chrome/test/app/tab_test_util.h"
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
#import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h"
......
...@@ -7,12 +7,19 @@ ...@@ -7,12 +7,19 @@
#include <string> #include <string>
@class NSError;
namespace chrome_test_util { namespace chrome_test_util {
// Attempts to tap the element with |element_id| in the current WebState // Attempts to tap the element with |element_id| in the current WebState
// using a JavaScript click() event. // using a JavaScript click() event.
bool TapWebViewElementWithId(const std::string& element_id); bool TapWebViewElementWithId(const std::string& element_id);
// Attempts to tap the element with |element_id| in the current WebState
// using a JavaScript click() event. |error| can be nil.
bool TapWebViewElementWithId(const std::string& element_id,
NSError* __autoreleasing* error);
// Attemps to submit form with |form_id| in the current WebState. // Attemps to submit form with |form_id| in the current WebState.
void SubmitWebViewFormWithId(const std::string& form_id); void SubmitWebViewFormWithId(const std::string& form_id);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ios/chrome/test/app/web_view_interaction_test_util.h" #import "ios/chrome/test/app/web_view_interaction_test_util.h"
#import "ios/chrome/test/app/chrome_test_util.h" #import "ios/chrome/test/app/chrome_test_util.h"
#import "ios/web/public/test/web_view_interaction_test_util.h" #import "ios/web/public/test/web_view_interaction_test_util.h"
...@@ -17,6 +17,12 @@ bool TapWebViewElementWithId(const std::string& element_id) { ...@@ -17,6 +17,12 @@ bool TapWebViewElementWithId(const std::string& element_id) {
return web::test::TapWebViewElementWithId(GetCurrentWebState(), element_id); return web::test::TapWebViewElementWithId(GetCurrentWebState(), element_id);
} }
bool TapWebViewElementWithId(const std::string& element_id,
NSError* __autoreleasing* error) {
return web::test::TapWebViewElementWithId(GetCurrentWebState(), element_id,
error);
}
void SubmitWebViewFormWithId(const std::string& form_id) { void SubmitWebViewFormWithId(const std::string& form_id) {
web::test::SubmitWebViewFormWithId(GetCurrentWebState(), form_id); web::test::SubmitWebViewFormWithId(GetCurrentWebState(), form_id);
} }
......
...@@ -35,6 +35,12 @@ CGRect GetBoundingRectOfElementWithId(web::WebState* web_state, ...@@ -35,6 +35,12 @@ CGRect GetBoundingRectOfElementWithId(web::WebState* web_state,
bool TapWebViewElementWithId(web::WebState* web_state, bool TapWebViewElementWithId(web::WebState* web_state,
const std::string& element_id); const std::string& element_id);
// Returns whether the element with |element_id| in the passed |web_state| has
// been tapped using a JavaScript click() event. |error| can be nil.
bool TapWebViewElementWithId(web::WebState* web_state,
const std::string& element_id,
NSError* __autoreleasing* error);
// Returns whether the element with |element_id| in the passed |web_state| has // Returns whether the element with |element_id| in the passed |web_state| has
// been focused using a JavaScript focus() event. // been focused using a JavaScript focus() event.
bool FocusWebViewElementWithId(web::WebState* web_state, bool FocusWebViewElementWithId(web::WebState* web_state,
......
...@@ -120,10 +120,12 @@ CGRect GetBoundingRectOfElementWithId(web::WebState* web_state, ...@@ -120,10 +120,12 @@ CGRect GetBoundingRectOfElementWithId(web::WebState* web_state,
} }
// Returns whether the Javascript action specified by |action| ran on // Returns whether the Javascript action specified by |action| ran on
// |element_id| in the passed |web_state|. // |element_id| in the passed |web_state|. |error| can be nil, and will return
// any error from executing JavaScript.
bool RunActionOnWebViewElementWithId(web::WebState* web_state, bool RunActionOnWebViewElementWithId(web::WebState* web_state,
const std::string& element_id, const std::string& element_id,
ElementAction action) { ElementAction action,
NSError* __autoreleasing* error) {
CRWWebController* web_controller = CRWWebController* web_controller =
static_cast<WebStateImpl*>(web_state)->GetWebController(); static_cast<WebStateImpl*>(web_state)->GetWebController();
const char* js_action = nullptr; const char* js_action = nullptr;
...@@ -150,39 +152,52 @@ bool RunActionOnWebViewElementWithId(web::WebState* web_state, ...@@ -150,39 +152,52 @@ bool RunActionOnWebViewElementWithId(web::WebState* web_state,
element_id.c_str(), js_action]; element_id.c_str(), js_action];
__block bool did_complete = false; __block bool did_complete = false;
__block bool element_found = false; __block bool element_found = false;
__block NSError* block_error = nil;
// |executeUserJavaScript:completionHandler:| is no-op for app-specific URLs, // |executeUserJavaScript:completionHandler:| is no-op for app-specific URLs,
// so simulate a user gesture by calling TouchTracking method. // so simulate a user gesture by calling TouchTracking method.
[web_controller touched:YES]; [web_controller touched:YES];
[web_controller executeJavaScript:script [web_controller executeJavaScript:script
completionHandler:^(id result, NSError*) { completionHandler:^(id result, NSError* error) {
did_complete = true; did_complete = true;
element_found = [result boolValue]; element_found = [result boolValue];
block_error = [error copy];
}]; }];
bool js_finished = WaitUntilConditionOrTimeout(kWaitForJSCompletionTimeout, ^{ bool js_finished = WaitUntilConditionOrTimeout(kWaitForJSCompletionTimeout, ^{
return did_complete; return did_complete;
}); });
if (error) {
*error = block_error;
}
return js_finished && element_found; return js_finished && element_found;
} }
bool TapWebViewElementWithId(web::WebState* web_state, bool TapWebViewElementWithId(web::WebState* web_state,
const std::string& element_id) { const std::string& element_id) {
return RunActionOnWebViewElementWithId(web_state, element_id, return RunActionOnWebViewElementWithId(web_state, element_id,
ELEMENT_ACTION_CLICK); ELEMENT_ACTION_CLICK, nil);
}
bool TapWebViewElementWithId(web::WebState* web_state,
const std::string& element_id,
NSError* __autoreleasing* error) {
return RunActionOnWebViewElementWithId(web_state, element_id,
ELEMENT_ACTION_CLICK, error);
} }
bool FocusWebViewElementWithId(web::WebState* web_state, bool FocusWebViewElementWithId(web::WebState* web_state,
const std::string& element_id) { const std::string& element_id) {
return RunActionOnWebViewElementWithId(web_state, element_id, return RunActionOnWebViewElementWithId(web_state, element_id,
ELEMENT_ACTION_FOCUS); ELEMENT_ACTION_FOCUS, nil);
} }
bool SubmitWebViewFormWithId(web::WebState* web_state, bool SubmitWebViewFormWithId(web::WebState* web_state,
const std::string& form_id) { const std::string& form_id) {
return RunActionOnWebViewElementWithId(web_state, form_id, return RunActionOnWebViewElementWithId(web_state, form_id,
ELEMENT_ACTION_SUBMIT); ELEMENT_ACTION_SUBMIT, nil);
} }
} // namespace test } // namespace test
......
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