#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/renderer/core/clipboard/system_clipboard.h"
#include "third_party/blink/renderer/core/dom/attribute.h"
#include "third_party/blink/renderer/core/dom/qualified_name.h"
#include "third_party/blink/renderer/core/editing/editor.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/editing/selection_template.h"
#include "third_party/blink/renderer/core/editing/visible_selection.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/keywords.h"
#include "third_party/blink/renderer/core/svg/animation/svg_smil_element.h"
#include "third_party/blink/renderer/core/svg/properties/svg_property_info.h"
#include "third_party/blink/renderer/core/svg/svg_a_element.h"
#include "third_party/blink/renderer/core/svg/svg_animate_element.h"
#include "third_party/blink/renderer/core/svg/svg_set_element.h"
#include "third_party/blink/renderer/core/svg_names.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/core/testing/mock_clipboard_host.h"
#include "third_party/blink/renderer/core/testing/null_execution_context.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/core/xlink_names.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "ui/gfx/geometry/size.h"
namespace blink {
void PasteAndVerifySanitization(const char* html_to_paste,
const char* expected_partial_contents) { … }
void PasteAndVerifyBasicSanitization(const char* unsafe_content) { … }
TEST(UnsafeSVGAttributeSanitizationTest, pasteAnchor_javaScriptHrefIsStripped) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
pasteAnchor_javaScriptXlinkHrefIsStripped) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
pasteAnchor_javaScriptHrefIsStripped_caseAndEntityInProtocol) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
pasteAnchor_javaScriptXlinkHrefIsStripped_caseAndEntityInProtocol) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
pasteAnchor_javaScriptHrefIsStripped_entityWithoutSemicolonInProtocol) { … }
TEST(
UnsafeSVGAttributeSanitizationTest,
pasteAnchor_javaScriptXlinkHrefIsStripped_entityWithoutSemicolonInProtocol) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
pasteAnimatedAnchor_javaScriptHrefIsStripped_caseAndEntityInProtocol) { … }
TEST(
UnsafeSVGAttributeSanitizationTest,
pasteAnimatedAnchor_javaScriptXlinkHrefIsStripped_caseAndEntityInProtocol) { … }
TEST(UnsafeSVGAttributeSanitizationTest, stringsShouldNotSupportAddition) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
stripScriptingAttributes_animateElement) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
isJavaScriptURLAttribute_hrefContainingJavascriptURL) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
isJavaScriptURLAttribute_xlinkHrefContainingJavascriptURL) { … }
TEST(
UnsafeSVGAttributeSanitizationTest,
isJavaScriptURLAttribute_xlinkHrefContainingJavascriptURL_alternatePrefix) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
isSVGAnimationAttributeSettingJavaScriptURL_fromContainingJavaScriptURL) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
isSVGAnimationAttributeSettingJavaScriptURL_toContainingJavaScripURL) { … }
TEST(
UnsafeSVGAttributeSanitizationTest,
isSVGAnimationAttributeSettingJavaScriptURL_valuesContainingJavaScriptURL) { … }
TEST(UnsafeSVGAttributeSanitizationTest,
isSVGAnimationAttributeSettingJavaScriptURL_innocuousAnimationAttribute) { … }
}