#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
+#include "net/base/filename_util.h"
#include "net/base/host_port_pair.h"
-#include "net/base/net_util.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
namespace content {
new_root->current_frame_host()->routing_id());
}
+IN_PROC_BROWSER_TEST_F(RenderViewHostTest, IsFocusedElementEditable) {
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
+
+ GURL test_url = embedded_test_server()->GetURL("/touch_selection.html");
+ NavigateToURL(shell(), test_url);
+
+ RenderViewHost* rvh = shell()->web_contents()->GetRenderViewHost();
+ EXPECT_FALSE(rvh->IsFocusedElementEditable());
+ EXPECT_TRUE(ExecuteScript(shell()->web_contents(), "focus_textfield();"));
+ EXPECT_TRUE(rvh->IsFocusedElementEditable());
+}
+
} // namespace content